home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1 / Ian and Stuart's One (Australia).iso / Australasian Legends / Commercial / Rainbow Hill / MacDOS™ 2.0.0 / User's Guide / 13.1 ! - DEL < prev    next >
Text File  |  1994-09-20  |  30KB  |  775 lines

  1. 13  Command Reference
  2.  
  3. !, REM
  4.        identifies comments (REM stands for the word remark).
  5.  
  6.    Syntax
  7.        ![text]
  8.        REM [text]
  9.  
  10.    Parameters
  11.        text
  12.        is one line of text which is ignored by MacDOS. Note that  a
  13.        space  is needed after the command name when the REM  format
  14.        is  used,  while  the  exclamation mark can  be  immediately
  15.        followed by the text.
  16.  
  17.    MacDOS vs DOS
  18.        DOS only supports the REM format.
  19.  
  20.    Notes
  21.        Input and output redirection
  22.        As   MacDOS   ignores  whatever  text  follows  the   remark
  23.        commands,  I/O  redirection and piping of  remarks  are  not
  24.        "seen" by MacDOS.
  25.  
  26.    Examples
  27.        !
  28.        REM
  29.        REM this is a remark
  30.        !*********** another remark ************
  31.        ! we want to switch off the following command temporarily
  32.        !echo off
  33.        REMARK: rejected because REM is not followed by a space
  34.  
  35.  
  36. ALARM
  37.        sets MacDOS' way of reporting errors and warnings.
  38.  
  39.    Syntax
  40.        alarm [ ON | OFF ]
  41.  
  42.    Parameters
  43.        [ ON | OFF ]
  44.        With  ON, ALARM directs MacDOS to report errors and warnings
  45.        via  alerts.  When  an  alert  is  displayed,  execution  is
  46.        suspended  until  you  acknowledge the  message.  With  OFF,
  47.        ALARM  directs  MacDOS  to report errors  and  warnings  via
  48.        concise   messages.  Execution  is  not  suspended.  Without
  49.        parameters, ALARM reports the current setting.
  50.  
  51.    MacDOS vs DOS
  52.        DOS does not support ALARM.
  53.  
  54.    Examples
  55.        ALARM ON
  56.        alarm Off
  57.        alarm > aFile
  58.  
  59.  
  60. CALL
  61.        starts   a   program  while  executing  in   batch   without
  62.        terminating the current batch program.
  63.  
  64.    Syntax
  65.        call program [batch parameters]
  66.  
  67.    Parameters
  68.        program
  69.        is  the  filename  of an application, an AppleScript,  or  a
  70.        batch  program, possibly preceded by an absolute or relative
  71.        path.
  72.  
  73.        batch parameters
  74.        parameters to be passed to the program if it is a batch.
  75.  
  76.    Switches
  77.        There  are  no switches for the CALL command, although  some
  78.        of  the  parameters for a batch program to be  executed  may
  79.        take the form of switches.
  80.  
  81.    MacDOS vs DOS
  82.        The  two  implementations  are  identical,  but  MacDOS  can
  83.        execute  CALL  from the prompt, while DOS  only  accepts  it
  84.        within batch programs.
  85.  
  86.    Notes
  87.        Output redirection
  88.        You  can redirect the output of batch programs when you CALL
  89.        them,  but  CALL does not accept output redirection  in  any
  90.        other case.
  91.  
  92.        Recursion
  93.        Recursive  calls  of  Batch programs,  whether  directly  or
  94.        through  a chain of batch programs, is certain to  cause  an
  95.        error  unless you use a terminating condition. This  is  due
  96.        to  the  fact  that MacDOS supports a maximum of  16  nested
  97.        CALLs.
  98.  
  99.        File extension
  100.        Batch filenames traditionally terminate with ".BAT", but  do
  101.        not  need to. When they do terminate with ".BAT", you do not
  102.        need  to  type  it.  MacDOS first  attempts  to  locate  the
  103.        filename  as  typed.  If the search is unsuccessful,  MacDOS
  104.        then  appends  the  extension ".BAT"  and  tries  again.  As
  105.        MacDOS  first tries to find a filename exactly as  typed  by
  106.        you,  you  have to be careful when the same folder  contains
  107.        two  files  with  the same name except for  the  terminating
  108.        ".BAT".  In that case, you need to type the ".BAT" in  order
  109.        to  distinguish between the two files. When MacDOS adds  the
  110.        extension  ".BAT",  it  expects to find  a  batch  file  and
  111.        reports an error in all other cases.
  112.  
  113.    Examples
  114.        CALL A_BATCH %1 %2 %3
  115.        The  currently executing batch program starts the batch file
  116.        A_BATCH and passes on to it its own first three parameters.
  117.  
  118.        call "Microsoft Word"
  119.        The  currently executing batch program launches MS Word  and
  120.        then continues execution.
  121.  
  122.    Frequently occurring errors
  123.        E27: File or directory not found
  124.        The  CALLed program or one of the folders specified  in  the
  125.        path could not be found.
  126.  
  127.  
  128. CD, CHDIR
  129.        change  the  current folder (ie. DIRectory) or  display  its
  130.        name.
  131.  
  132.    Syntax
  133.        cd folder
  134.        chdir folder
  135.  
  136.        The two commands are functionally identical.
  137.  
  138.    Parameters
  139.        folder
  140.        is  a  name  preceded by an absolute or relative path  which
  141.        specifies  the new folder. When you use two dots  as  folder
  142.        name,  CD attaches to the folder which contains the  current
  143.        folder. When you use as folder name a volume ID followed  by
  144.        a  colon,  CD  displays  the current  folder  of  the  given
  145.        volume. Without folder name, CD displays the current  volume
  146.        and folder.
  147.  
  148.    MacDOS vs DOS
  149.        The two implementations are identical.
  150.  
  151.    Examples
  152.        cd aFolder
  153.        attaches  to the folder named aFolder and contained  in  the
  154.        current folder.
  155.  
  156.        cd ..
  157.        attaches  to  the folder which contains the current  folder.
  158.        In  DOS,  that folder is usually referred to as the  "parent
  159.        directory".
  160.  
  161.        chdir 1:\
  162.        attaches to the root folder of the start-up volume.
  163.  
  164.        chdir 2:sub1\sub2
  165.        attaches  to the sub2 folder contained in sub1,  where  sub1
  166.        is a folder contained in the current folder of volume 2.
  167.  
  168.        cd "\desktop folder"
  169.        attaches  to  the folder which contains items  displayed  on
  170.        the desktop of the current volume.
  171.  
  172.    Frequently occurring errors
  173.        E27: File or directory not found
  174.        The  requested folder could not be found. Perhaps it  exists
  175.        but on a different volume.
  176.  
  177.  
  178. CLOSE
  179.        closes a file opened with the command OPEN.
  180.  
  181.    Syntax
  182.        close fileID
  183.  
  184.    Parameters
  185.        fileID
  186.        is the file-identification number returned by OPEN.
  187.  
  188.    MacDOS vs DOS
  189.        DOS does not support CLOSE.
  190.  
  191.    Notes
  192.        Errors
  193.        CLOSE  does  not generate an error message if  it  fails  to
  194.        close  a file. The intent is to encourage you to be  on  the
  195.        safe  side and perhaps close the files more than once rather
  196.        than not at all.
  197.  
  198.    Examples
  199.        close 3
  200.        CLOSE %FileID%
  201.  
  202.    Frequently occurring errors
  203.        E13: Syntax: invalid arguments
  204.        The  fileID was not a number. Perhaps you passed a  variable
  205.        name  without  enclosing it between percent  signs,  or  the
  206.        variable contained an alphabetic string.
  207.  
  208.    See Also
  209.        OPEN, READ
  210.  
  211.  
  212. CLS
  213.        clears the MacDOS window.
  214.  
  215.    Syntax
  216.        cls
  217.  
  218.    MacDOS vs DOS
  219.        The two implementations are identical.
  220.  
  221.  
  222. CONFIRM
  223.        directs  MacDOS  to ask for confirmation before  overwriting
  224.        or removing existing files.
  225.  
  226.    Syntax
  227.        confirm [ ON | OFF ]
  228.  
  229.    Parameters
  230.        [ ON | OFF ]
  231.        CONFIRM    ON    directs   MacDOS   to   ask   confirmation.
  232.        CONFIRM  OFF directs MacDOS to stop asking for confirmation.
  233.        Without parameters, CONFIRM reports the current setting.
  234.  
  235.    MacDOS vs DOS
  236.        DOS does not support CONFIRM.
  237.  
  238.    Examples
  239.        confirm ON
  240.        confirm oFf
  241.        CONFIRM >aFile
  242.  
  243.  
  244. COPY
  245.        copies  one or more files between locations. Both  data  and
  246.        resource forks are copied.
  247.  
  248.    Syntax
  249.        copy source [,...] [destination] [/A] [/C=creator] [/D]
  250.        [/P] [/R] [/T=file type] [/U] [/V]
  251.  
  252.    Parameters
  253.        source [,...]
  254.        is  a  name  preceded by an absolute or relative path  which
  255.        specifies the file or group of files to be copied.  A  group
  256.        of  files  is  identified  via a wildcarded  filename  or  a
  257.        folder  name. To copy several sources, you can specify  them
  258.        one after the other separated by commata.
  259.  
  260.        destination
  261.        is  a  name  preceded by an absolute or relative path  which
  262.        specifies the file or folder to which the source[s]  are  to
  263.        be copied.
  264.  
  265.    Switches
  266.        /A
  267.        directs  MacDOS to append files to the destination file,  so
  268.        that  its  initial  content is preserved. This  switch  only
  269.        takes effect when the destination is an individual file.
  270.  
  271.        /C=creator
  272.        specifies that only files of a particular creator are to  be
  273.        copied.  Note that no spaces are allowed on either  side  of
  274.        the   equal  sign  and  that  the  creator  string  is  four
  275.        characters  long.  Therefore, if a creator includes  spaces,
  276.        you  must  double  quote the switch (eg. copy  \  "/c=ABC  "
  277.        copies all the files created by 'ABC ' in the root folder).
  278.  
  279.        /D
  280.        specifies   that  only  data  forks  are   to   be   copied.
  281.        Nevertheless, when both /D and /R are ON, MacDOS behaves  as
  282.        if they were both OFF; ie. it copies both forks.
  283.  
  284.        /P
  285.        prompts  you  for  confirmation before overwriting  existing
  286.        destination files.
  287.  
  288.        /R
  289.        specifies  that  only  resource  forks  are  to  be  copied.
  290.        Nevertheless, when both /D and /R are ON, MacDOS behaves  as
  291.        if they were both OFF; ie. it copies both forks.
  292.  
  293.        /T=file type
  294.        specifies  that only files of a particular type  (eg.  TEXT)
  295.        are  to be copied. Note that no spaces are allowed on either
  296.        side  of  the  equal  sign and that the file  type  is  four
  297.        characters long. Therefore, if a file type includes  spaces,
  298.        you  must  double  quote the switch (eg. copy  \  "/t=ABC  "
  299.        copies all the files of type 'ABC ' in the root folder).
  300.  
  301.        /U
  302.        specifies  that source files overwrite existing  destination
  303.        files only if the source was updated more recently.
  304.  
  305.        /V
  306.        re-reads  destination files to verify that  they  have  been
  307.        copied correctly.
  308.  
  309.    MacDOS vs DOS
  310.        Source
  311.        When  you  specify several sources in DOS, you must separate
  312.        them  by plus signs. DOS then appends them to each other  in
  313.        a  very  complex way. With MacDOS, you separate the  sources
  314.        with  commata and MacDOS merges them only if you  specify  a
  315.        single file as destination.
  316.  
  317.        Destination
  318.        Wildcarded   destinations  are  illegal  in   MacDOS.   This
  319.        limitation  is  mainly due to the fact that  wildcarding  is
  320.        more  powerful in MacDOS than in DOS. The matching of source
  321.        and  destination  wildcarded identifiers would  have  become
  322.        very complex and too difficult to use.
  323.  
  324.        Copying empty files
  325.        Unlike DOS, MacDOS copies zero-length files.
  326.  
  327.        Switches
  328.        MacDOS provides several switches which are not available  in
  329.        DOS  but  does not provide the /A/B switches to  distinguish
  330.        ASCII  and  binary  copying. MacDOS always  performs  binary
  331.        copies.
  332.  
  333.        Merging into one of the sources
  334.        When  several  files  are merged into a  single  file  which
  335.        coincides  with  one of the sources, MacDOS overwrites  that
  336.        source  with  the result of the merging. Unlike DOS,  MacDOS
  337.        performs  correctly  regardless of whether  the  destination
  338.        file  coincides  with the first source or with  one  of  the
  339.        following sources.
  340.  
  341.        Updating the date/time
  342.        In  DOS,  the  command "copy source+,," assigns the  current
  343.        date/time to a file. With MacDOS, you can achieve  the  same
  344.        result through the switch /D of the RENAME command.
  345.  
  346.    Notes
  347.        Commata between source files
  348.        The  comma  is only allowed between source files. Therefore,
  349.        a list of sources must not terminate with a comma.
  350.  
  351.        Creators, file types, and finder flags
  352.        When  copying a file, MacDOS assigns to the destination  the
  353.        same  creator,  file type, and finder flags.  This  is  also
  354.        true   when   several  files  are  merged  into   a   single
  355.        destination  file, but only if all individual  source  files
  356.        to  be  merged have identical parameters. When this  is  not
  357.        the  case,  the  parameters  which  are  not  identical  are
  358.        replaced by defaults. The default for both creator and  file
  359.        type is ????, while the default for the finder flags is all-
  360.        zeroes.  For example, when several text files with different
  361.        creators are merged into a single file, the new file  has  a
  362.        ???? creator  but is of type TEXT.
  363.  
  364.        Dates
  365.        When  copying files, MacDOS assigns to the destinations  the
  366.        same   creation   and  modify  dates  of  the  corresponding
  367.        sources.   When   several  files   are   merged   into   one
  368.        destination,  MacDOS ignores the source dates and  sets  the
  369.        destination  date  to  the current date  and  time  on  copy
  370.        completion.
  371.  
  372.        The /U switch
  373.        You  can  use  the  switch /U to implement a  simple  backup
  374.        batch  program, as only files updated after  the  last  COPY
  375.        are actually copied.
  376.  
  377.        Order of copying
  378.        To  know  the  order  in which groups of files  are  copied,
  379.        execute  a  DIR command with no sorting options. This  might
  380.        be important when several files are merged into one.
  381.  
  382.        Copying of resource forks
  383.        Note   that  MacDOS  does  not  merge  resource  forks  when
  384.        concatenating files. Therefore, it really only  makes  sense
  385.        to  append  data  forks. If you do concatenate  files  which
  386.        have  resource  forks, the resource forks  appended  to  the
  387.        first  one  will  not be accessible via ResEdit  or  similar
  388.        editors.
  389.  
  390.    Examples
  391.        In  all the following examples, \Dir1 contains: "FILE1.TXT",
  392.        "FILE1  TXT", "FILE2 TXT", "FI TXT", "FI BLA", "FILE1  BLA",
  393.        "FILE3  BLA",  "FILE1 ZAP", "FILE3 ZAP", and folder  "Dir2",
  394.        while Dir2 is empty. The attach point is Dir2.
  395.  
  396.        COPY Dir1\*.*
  397.        Dir2 then contains FILE1.TXT
  398.  
  399.        COPY "Dir1\FILE3 ZAP" Dir1\ZZZ
  400.        Dir2  remains empty, but a copy of "FILE3 ZAP" named ZZZ  is
  401.        made in Dir1
  402.  
  403.        COPY "Dir1\*1 *" ZZZ
  404.        Dir2   then   contains  ZZZ,  which   is   the   result   of
  405.        concatenating "FILE1 TXT", "FILE1 BLA", and "FILE1 ZAP"
  406.  
  407.        COPY DIR1\*3*, Dir1\*2* Z23
  408.        Dir2   then   contains  Z23,  which   is   the   result   of
  409.        concatenating "FILE3 BLA", "FILE3 ZAP", and "FILE2 TXT"
  410.  
  411.        COPY Dir1\*2*,Dir1\*1.* Dir1\FILE1.TXT
  412.        Dir2 remains empty, but the file "FILE2 TXT" is appended  to
  413.        FILE1.TXT in Dir1.
  414.  
  415.        COPY Dir1 Dir2           or
  416.        COPY Dir1\FI* Dir2        or
  417.        COPY ..\*?*?* \Dir1\Dir2
  418.        Dir2  then  contains "FILE1.TXT", "FILE1 TXT", "FILE2  TXT",
  419.        "FI  TXT", "FI BLA", "FILE1 BLA", "FILE3 BLA", "FILE1  ZAP",
  420.        and "FILE3 ZAP"
  421.  
  422.    Frequently occurring errors
  423.        E13: Syntax: invalid arguments
  424.        This  error  is  generated in a number of  occasions.  Check
  425.        that  the destination argument is either a folder name or  a
  426.        filename  without  wildcards. Also  check  that  a  list  of
  427.        source  filenames does not end with a comma, as commata  are
  428.        only allowed between source files.
  429.  
  430.        E27: File or directory not found
  431.        The  source parameter did not identify any file  at  all  or
  432.        one  of  the  folders specified in the  path  could  not  be
  433.        found.  Note that creator and file type are case  sensitive.
  434.        Therefore, /T=text will not find any file of type TEXT.
  435.  
  436.        E28: Bad switch
  437.        Perhaps  you  failed  to  specify a  creator  or  file  type
  438.        correctly.  The  equal  sign  is  mandatory  and  all   four
  439.        characters which form the OSType must be provided.
  440.  
  441.  
  442. DATE
  443.        displays  and  sets  the system date and  the  date  format.
  444.        MacDOS  uses the format set through DATE whenever  it  needs
  445.        to  display  a date (starting a LOG file, in a DIR  listing,
  446.        etc.).
  447.  
  448.    Syntax
  449.        date [format | date]
  450.  
  451.    Parameters
  452.        format
  453.        is  a  string which specifies order and number of digits  of
  454.        year,  month,  and day. It also specifies the separators  to
  455.        be   used   between  the  fields.  The  default  format   is
  456.        yyyy/mm/dd.  The  characters  'y',  'm',  and  'd'  used  to
  457.        specify the date format can be in upper or lower case.
  458.  
  459.        date
  460.        is  the  new  system date. It is specified  in  the  current
  461.        format.  The  Macintosh only accepts dates in  the  interval
  462.        1904 to 2040.
  463.  
  464.        Without  parameters, DATE displays the current  system  date
  465.        in  the  current format and prompts you for input.  You  can
  466.        reply  with either a new date or a new format. If  you  want
  467.        to  leave  both  system date and format unchanged,  hit  the
  468.        return key.
  469.  
  470.    MacDOS vs DOS
  471.        DOS  does not let you change the date format via the command
  472.        DATE.
  473.  
  474.    Notes
  475.        Parameter or not parameter
  476.        You  will  probably execute DATE interactively when changing
  477.        the   system  date.  In  that  case,  execute  DATE  without
  478.        parameter,  so  that  MacDOS displays the  current  settings
  479.        before  prompting  you for the new date.  This  will  ensure
  480.        that you use the correct format when typing the new date.
  481.  
  482.        Format default
  483.        Format   settings  are  forgotten  when  you  quit   MacDOS.
  484.        Therefore, it is advisable that you write in autoexec.bat  a
  485.        DATE command which specifies your preferred format.
  486.  
  487.        Formats in input and in output
  488.        MacDOS allows some flexibility when a new date is set:
  489.        •  It  ignores leading zeroes. For instance, 00001998,  008,
  490.           and  0000998  all  indicate the year 1998  regardless  of
  491.           whether the year is being displayed as 0001998, 1998,  or
  492.           0000000001998   (with   formats   yyyyyyy,   yyyy,    and
  493.           yyyyyyyyyyyyy respectively).
  494.        •  It  accepts a full value also when its number  of  digits
  495.           exceeds  the  field  length.  For  instance,  1998,  998,
  496.           00098,  and  008  are  all  valid  inputs  regardless  of
  497.           whether  the  format  is yyyyyy, yyy,  y,  or  yyy.  This
  498.           applies  to  months and days as well,  so  that  October,
  499.           November, and December can be entered when the length  of
  500.           the month field is a single character.
  501.        •  It  uses  the  current year as a base for  the  new  year
  502.           setting. For instance, if the current year is 1998,  some
  503.           of  the  possible  inputs  to  change  it  to  1999  are:
  504.           0001999, 09, 99, 1999, 00999, and 0000099.
  505.        The  bottom  line is that you can choose the  output  format
  506.        for  dates  without imposing too many constraints in  input:
  507.        as  long  as  you type the correct number of fields  in  the
  508.        correct  order  and  with the correct separators,  you  will
  509.        probably be ok.
  510.  
  511.    Examples
  512.        The  following  examples illustrate how to change  the  date
  513.        format. The 5th day of December 1949 (my birthday!) is  used
  514.        to show the result of the change.
  515.           date mm/dd/yy     12/05/49
  516.           date dd/MM/yyyy   05/12/1949
  517.           date yy-m;ddddd   49-2;00005
  518.           date yyYYyyy/dd   0001949/05
  519.           date yyy          949
  520.           date dd mmKyy     05 12K49
  521.           date YY/          49
  522.        As  you can see, you can mix and match year, month, and  day
  523.        as  you  please.  Separators must be  present  and  must  be
  524.        single  characters  but  they can  be  different  from  each
  525.        other.  The  characters yYmMdD0123456789 cannot be  used  as
  526.        separators.
  527.        Some invalid date formats are:
  528.           mm/dd//yy         double separator
  529.           mmJJdd            double separator
  530.           yyyyDmm           'D' is not a valid separator
  531.           mm1dd2yy          '1' and '2' are not valid separators
  532.  
  533.        When  setting  the  system date,  you  have  to  follow  the
  534.        current format, but leading zeroes can be omitted.
  535.        date 10/11/12  sets completely different dates depending  on
  536.        the  format  and  the current date. If the current  date  is
  537.        January 1st 1993, here are some possible outcomes:
  538.           format: mm/dd/yy  date: 11th October 1912
  539.           format: dd/mm/yy  date: 10th November 1912
  540.           format: yy/mm/dd  date: 11th December 1910
  541.        If  the  current date is January 1st 2001, the same  formats
  542.        result in the following dates:
  543.           format: mm/dd/yy  date: 11th October 2012
  544.           format: dd/mm/yy  date: 10th November 2012
  545.           format: yy/mm/dd  date: 11th December 2010
  546.        This  is due to the fact that MacDOS adds the leading digits
  547.        of the year on the basis of the current year.
  548.  
  549.        The  following examples show some valid combinations of date
  550.        formats and date inputs:
  551.           format    current date  date input  resulting date
  552.           yyyy      16 Aug 1993   4         16 Aug 1994
  553.           y/m/d     20 Dec 2001   5/4/3     03 Apr 2005
  554.           mmmm/dd   07 Mar 1998   1/1       01 Jan 1998
  555.           dd-mm-yy  07 Mar 1998   7-3-2000  07 Mar 2000
  556.  
  557.        And  here  are some examples of date inputs which  would  be
  558.        rejected:
  559.           format    current date  date input  why
  560.           yyyy      16 Aug 2000   41        year > 2040
  561.           y/m/d     20 Dec 2001   5/4/31    April has 30 days
  562.           yy        29 Feb 1996   8         1998 not a leap year
  563.           dd;mm;yy  13 Mar 1997   14;3      year is missing
  564.           dd;mm;yy  13 Mar 1997   14;;98    month is missing
  565.           mm-dd-yy  13 Mar 1997   0-15-98   day < 1
  566.  
  567.    Frequently occurring errors
  568.        E47: Invalid date or date format
  569.        You  probably  used  the wrong separators  or  omitted  some
  570.        fields.
  571.  
  572.    See Also
  573.        TIME
  574.  
  575.  
  576. DECR
  577.        decrements or shortens values of global variables.
  578.  
  579.    Syntax
  580.  
  581.        decr [+ | -]var [by {number | string}]
  582.  
  583.        "decr var", equivalent to "decr +var by 1", decrements by  1
  584.        numeric  values and removes one character from  the  end  of
  585.        alphanumeric strings.
  586.  
  587.    Parameters
  588.        [+ | -]var
  589.        is  the  name of a global variable, possibly preceded  by  a
  590.        plus  or a minus sign. No space is allowed between the  sign
  591.        and  the variable name. DECR uses the sign to decide whether
  592.        to  perform string operations at the end or at the beginning
  593.        of var's value.
  594.  
  595.        number
  596.        is  a  signed  integer number. DECR uses number  differently
  597.        depending on whether var  contains a numeric value or not:
  598.        •  When  var contains a numeric value, DECR replaces it with
  599.           the value obtained after subtracting number.
  600.        •  When var contains an alphanumeric string which cannot  be
  601.           interpreted  as  a number, DECR removes  from  it  number
  602.           characters.   The   characters  are  removed   from   the
  603.           beginning  if the variable name is preceded by the  minus
  604.           sign,  otherwise  they are removed from  its  end.   When
  605.           number is negative, DECR actually extends the content  of
  606.           var  by appending or prepending spaces (depending on  the
  607.           presence of the minus sign before the variable name).
  608.  
  609.        string
  610.        is  an alphanumeric string which cannot be interpreted as  a
  611.        number.  DECR  removes string from the string  contained  in
  612.        var.  The  string  is  removed from  the  beginning  if  the
  613.        variable  name is preceded by the minus sign, otherwise  the
  614.        string is removed from its end.
  615.  
  616.    MacDOS vs DOS
  617.        DOS does not support DECR.
  618.  
  619.    Notes
  620.        Removing numeric characters
  621.        When  the  BY-string is numeric, DECR decrements  a  numeric
  622.        variable   by  that  amount  or  removes  that   number   of
  623.        characters  from an alphanumeric variable. If  your  purpose
  624.        is  to  remove  digits from a variable (eg. the  terminating
  625.        '1' from the string "1341"), you can achieve this result  by
  626.        adding  an  alphabetic  character  to  the  variable  before
  627.        removing  the  digit  (ie.  INCR  var  BY  x   followed   by
  628.        DECR var BY 1x).
  629.  
  630.        Decrementing too much
  631.        When  the number of characters that you want to remove  from
  632.        a  string  is  greater than the length of the  string,  DECR
  633.        removes   all  the  characters  contained  in  the  variable
  634.        without   returning  any  error.  The   variable   is   then
  635.        automatically removed from the environment if  it  is  user-
  636.        defined,  or  reset  to  its  default  if  it  is  a  system
  637.        variable.
  638.  
  639.    Examples
  640.           initial var   command             resulting var
  641.           "25"          decr var            "24"
  642.           "25"          decr -var           "24"
  643.           "+25"         decr var by 30      "-5"
  644.           "25"          decr var by -3      "28"
  645.           "-7"          decr var by -30     "23"
  646.           "abcde"       decr var            "abcd"
  647.           "abcde"       decr -var           "bcde"
  648.           "abcde"       decr var by 3       "ab"
  649.           "abcde"       decr var by -1      "abcde "
  650.           "abcde"       decr -var by -3     "   abcde"
  651.           "ab de"       decr var by de      "ab "
  652.           "a cde"       decr -var by "a "   "cde"
  653.           "abcde"       decr +var by 7      var removed
  654.           "abcde"       decr var by abcde   var removed
  655.           "abcde"       decr var by fgh     fails
  656.  
  657.    Frequently occurring errors
  658.        E63: Requested variable has not been defined
  659.        You  attempted to DECRement a variable that did  not  exist.
  660.        Remember  that  empty  variables are  automatically  removed
  661.        unless they are system variables.
  662.  
  663.        E72: String search failed
  664.        This  error  is  often due to the fact  that  DECR  is  case
  665.        sensitive.  Therefore, the removal of a substring  does  not
  666.        succeed   if  you  do  not  match  upper  and  lower   cases
  667.        sequences. You also get this error if you erroneously  typed
  668.        DECR instead of INCR.
  669.  
  670.    See Also
  671.        INCR, SSTR, TOUPPER
  672.  
  673.  
  674. DEL, ERASE
  675.        remove from the system (ie. DELete) one or more files.
  676.  
  677.    Syntax
  678.        del file [/C=creator] [/P] [/T=file type]
  679.        erase file [/C=creator] [/P] [/T=file type]
  680.  
  681.        The two commands are functionally identical.
  682.  
  683.    Parameters
  684.        file
  685.        is  a  name  preceded by an absolute or relative path  which
  686.        specifies the file or group of files to be deleted. A  group
  687.        of  files  is  identified  via a wildcarded  filename  or  a
  688.        folder name.
  689.  
  690.    Switches
  691.        /C=creator
  692.        specifies that only files of a particular creator are to  be
  693.        deleted. Note that no spaces are allowed on either  side  of
  694.        the   equal  sign  and  that  the  creator  string  is  four
  695.        characters  long.  Therefore, if a creator includes  spaces,
  696.        you  must  double  quote the switch (eg.  del  \  "/c=ABC  "
  697.        deletes  all  the  files  created by  'ABC  '  in  the  root
  698.        folder).
  699.  
  700.        /P
  701.        prompts you for confirmation before deleting each file.
  702.  
  703.        /T=file type
  704.        specifies  that only files of a particular type  (eg.  TEXT)
  705.        are  to  be  deleted.  Note that no spaces  are  allowed  on
  706.        either  side  of the equal sign and that the  file  type  is
  707.        four  characters  long. Therefore, if a file  type  includes
  708.        spaces,     you    must    double    quote    the     switch
  709.        (eg.  del \ "/t=ABC " deletes all the files of type  'ABC  '
  710.        in the root folder).
  711.  
  712.    MacDOS vs DOS
  713.        The two implementations are identical.
  714.  
  715.    Notes
  716.        Deleting everything
  717.        Under   certain  circumstances,  MacDOS  prompts   you   for
  718.        confirmation before beginning execution of the DEL  command.
  719.        This  happens  when  you  type one of  the  following  three
  720.        commands:
  721.        •  DEL *
  722.          to delete all the files in the current folder.
  723.        •  DEL *.*
  724.          to  delete all the files of the current folder which  have
  725.           a  DOS-like  name. This particular case has  been  copied
  726.           from DOS because DOS users would expect to be prompted.
  727.        •  DEL foldname
  728.          to delete all the files in the folder named foldname.
  729.        MacDOS  suppresses this prompt while executing in  batch  or
  730.        when  you  request  to be prompted before deletion  of  each
  731.        individual  file  (CONFIRM is ON  or the DEL  option  /P  is
  732.        ON).
  733.  
  734.        Deleting files vs removing folders
  735.        DEL  only operates on files. Therefore, when you pass to DEL
  736.        the name of a folder, MacDOS deletes the files contained  in
  737.        the  folder  rather than the folder itself. If you  want  to
  738.        remove a folder, you have to use RMDIR.
  739.  
  740.        Trashing vs DELeting
  741.        DELetion is equivalent to moving files to the Trash Can  and
  742.        then  emptying the trash. That is, DELeted files are totally
  743.        removed  from  the system. If you want to have  a  behaviour
  744.        similar  to  the  Macintosh Finder, use  the  batch  program
  745.        trash.bat included as example in the MacDOS package.
  746.  
  747.    Examples
  748.        DEL oldDocs /t=WDBN /p
  749.        deletes  all MS-Word documents in the folder named  oldDocs.
  750.        It also asks confirmation before deleting each file.
  751.  
  752.        DEL * /t=TEXT /c=MSWD
  753.        deletes  all text files produced with MS-Word in the current
  754.        folder.
  755.  
  756.        DEL 1:\Trash
  757.        removes  all  the files contained in the Trash  Can  of  the
  758.        start-up volume.
  759.  
  760.        DEL 2:\*old*
  761.        deletes  all  the files in the root of volume 2  whose  name
  762.        contains  the  string "old" (watch out; such a command  also
  763.        deletes  files  like myGoldenFile, FOLDERlist,  Soldano.txt,
  764.        etc. which are not necessarily old).
  765.  
  766.    Frequently occurring errors
  767.        E27: File or directory not found
  768.        The  file  parameter  did  not identify  any  file  at  all.
  769.        Perhaps,  you asked to delete the contents of a  folder  but
  770.        the folder did not contain any file.
  771.  
  772.    See Also
  773.        RD, RMDIR
  774.  
  775.